// 手机号的正则表达式
const phoneTest = /^1[3456789]\d{9}$/

function debounce(method, delay = 200) {
  let timer = null
  return function (...arg) {
    if (timer) clearTimeout(timer)
    timer = setTimeout(() => {
      this[method].apply(null, arg)
    }, delay)
  }
}

export { phoneTest, debounce }
